package com.magic.ch11_7月真题.走方格;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

/**
 * created by mzk on 2020/07/16
 */
public class Main_dfs {
    static int N = 35;
    static int[][] dp = new int[N][N];
    static int n, m;

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        String[] arr = br.readLine().split(" ");
        n = Integer.parseInt(arr[0]);
        m = Integer.parseInt(arr[1]);
        br.close();

        if (n % 2 == 0 && m % 2 == 0) {
            pw.print(0);
        } else {
            dp[n][m] = 1;
            pw.printf("%d\n", dfs(1, 1));
        }
        pw.flush();
        pw.close();
    }

    private static int dfs(int x, int y) {
        if (x % 2 != 0 || y % 2 != 0) {
            if (dp[x][y] > 0) {
                return dp[x][y];
            }
            if (x < n) {
                dp[x][y] += dfs(x + 1, y);
            }
            if (y < m) {
                dp[x][y] += dfs(x, y + 1);
            }
        }
        return dp[x][y];
    }
}
